# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='TbFormdraft',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('table_name', models.CharField(blank=True, null=True, max_length=255)),
                ('table_content', models.TextField()),
                ('creator', models.CharField(max_length=20)),
                ('create_time', models.DateTimeField()),
                ('modify_time', models.DateTimeField()),
                ('status', models.IntegerField()),
                ('file1', models.CharField(blank=True, null=True, max_length=255)),
                ('file2', models.CharField(blank=True, null=True, max_length=255)),
                ('file3', models.CharField(blank=True, null=True, max_length=255)),
                ('file4', models.CharField(blank=True, null=True, max_length=255)),
                ('file5', models.CharField(blank=True, null=True, max_length=255)),
                ('file6', models.CharField(blank=True, null=True, max_length=255)),
            ],
            options={
                'db_table': 'tb_formdraft',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='TbApplyform',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('card_id', models.CharField(blank=True, null=True, max_length=30)),
                ('form_content', models.TextField(blank=True, null=True)),
                ('apply_type', models.CharField(blank=True, null=True, max_length=50)),
                ('applicant', models.CharField(blank=True, null=True, max_length=50)),
                ('apply_dept', models.CharField(blank=True, null=True, max_length=50)),
                ('apply_time', models.DateTimeField(blank=True, null=True)),
                ('apply_endtime', models.DateTimeField(blank=True, null=True)),
                ('form_footer', models.CharField(blank=True, null=True, max_length=255)),
                ('sign_status', models.IntegerField(blank=True, null=True)),
                ('desc', models.CharField(blank=True, null=True, max_length=255)),
                ('file1', models.CharField(blank=True, null=True, max_length=255)),
                ('file2', models.CharField(blank=True, null=True, max_length=255)),
                ('file3', models.CharField(blank=True, null=True, max_length=255)),
                ('file4', models.CharField(blank=True, null=True, max_length=255)),
                ('file5', models.CharField(blank=True, null=True, max_length=255)),
                ('file6', models.CharField(blank=True, null=True, max_length=255)),
                ('degree', models.CharField(blank=True, null=True, max_length=20)),
                ('sign_image', models.CharField(blank=True, null=True, max_length=20)),
                ('layout', models.CharField(blank=True, null=True, max_length=25)),
            ],
            options={
                'db_table': 'tb_applyform',
            },
        ),
        migrations.CreateModel(
            name='TbColor',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('color', models.CharField(max_length=50)),
                ('desc', models.CharField(blank=True, null=True, max_length=255)),
            ],
            options={
                'db_table': 'tb_color',
            },
        ),
        migrations.CreateModel(
            name='TbDatasource',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('api', models.CharField(blank=True, null=True, max_length=100)),
                ('apiname', models.CharField(blank=True, db_column='apiName', null=True, max_length=100)),
                ('apidescription', models.CharField(blank=True, db_column='apiDescription', null=True, max_length=255)),
            ],
            options={
                'db_table': 'tb_datasource',
            },
        ),
        migrations.CreateModel(
            name='TbFormfile',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('url', models.CharField(max_length=255)),
                ('status', models.IntegerField(blank=True, null=True)),
                ('forms_id', models.ForeignKey(to='tb_forms.TbApplyform', blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='TbFormheader',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('header_img', models.CharField(blank=True, null=True, max_length=50)),
                ('header_url', models.CharField(blank=True, null=True, max_length=255)),
            ],
            options={
                'db_table': 'tb_formheader',
            },
        ),
        migrations.CreateModel(
            name='TbForms',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('table_name', models.CharField(max_length=100)),
                ('table_content', models.TextField(blank=True, null=True)),
                ('create_time', models.DateTimeField(blank=True, null=True)),
                ('creater', models.CharField(blank=True, null=True, max_length=15)),
                ('version', models.CharField(blank=True, null=True, max_length=10)),
                ('status', models.IntegerField(blank=True, null=True)),
                ('desc', models.CharField(blank=True, null=True, max_length=255)),
                ('modify_time', models.CharField(blank=True, null=True, max_length=15)),
                ('sign_type', models.CharField(blank=True, null=True, max_length=20)),
                ('layout', models.CharField(blank=True, null=True, max_length=20)),
            ],
            options={
                'db_table': 'tb_forms',
            },
        ),
        migrations.CreateModel(
            name='TbFormtype',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('forms_type', models.CharField(blank=True, null=True, max_length=50)),
                ('statue', models.IntegerField(blank=True, null=True)),
                ('type_english', models.CharField(blank=True, null=True, max_length=100)),
                ('type_code', models.CharField(blank=True, null=True, max_length=15)),
                ('type_id', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'db_table': 'tb_formtype',
            },
        ),
        migrations.CreateModel(
            name='TbOrg',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('org_name', models.CharField(max_length=100)),
                ('parent_id', models.IntegerField(blank=True, null=True)),
                ('create_date', models.DateTimeField()),
                ('org_code', models.CharField(blank=True, null=True, max_length=50)),
                ('cost_code', models.CharField(blank=True, null=True, max_length=50)),
                ('org_desc', models.CharField(blank=True, null=True, max_length=500)),
                ('org_desc2', models.CharField(blank=True, null=True, max_length=500)),
                ('is_active', models.IntegerField()),
            ],
            options={
                'db_table': 'tb_org',
            },
        ),
        migrations.CreateModel(
            name='TbSite',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('site_code', models.CharField(unique=True, max_length=50)),
                ('site_name', models.CharField(max_length=50)),
                ('area_code', models.CharField(blank=True, null=True, max_length=10)),
                ('create_date', models.DateTimeField()),
            ],
            options={
                'db_table': 'tb_site',
            },
        ),
        migrations.CreateModel(
            name='TbSourcelist',
            fields=[
                ('id', models.IntegerField(serialize=False, primary_key=True)),
                ('apiparamname', models.CharField(blank=True, db_column='apiParamName', null=True, max_length=255)),
                ('apiparamdescription', models.CharField(blank=True, db_column='apiParamDescription', null=True, max_length=255)),
                ('source', models.ForeignKey(to='tb_forms.TbDatasource')),
            ],
            options={
                'db_table': 'tb_sourcelist',
            },
        ),
        migrations.CreateModel(
            name='TbUser',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('password', models.CharField(max_length=128)),
                ('last_login', models.DateTimeField(blank=True, null=True)),
                ('is_superuser', models.IntegerField()),
                ('username', models.CharField(unique=True, max_length=30)),
                ('first_name', models.CharField(max_length=30)),
                ('last_name', models.CharField(max_length=30)),
                ('email', models.CharField(max_length=254)),
                ('is_staff', models.IntegerField()),
                ('is_active', models.IntegerField()),
                ('date_joined', models.DateTimeField()),
                ('nfc_id', models.CharField(blank=True, db_column='NFC_id', null=True, max_length=100)),
                ('ext', models.CharField(blank=True, null=True, max_length=50)),
                ('short_number', models.CharField(blank=True, null=True, max_length=50)),
                ('mobile_phone', models.CharField(blank=True, null=True, max_length=50)),
                ('head', models.CharField(blank=True, null=True, max_length=100)),
                ('sign', models.CharField(blank=True, null=True, max_length=100)),
                ('entry_date', models.DateField()),
                ('sex', models.CharField(max_length=10)),
                ('status_id', models.IntegerField()),
            ],
            options={
                'db_table': 'tb_user',
            },
        ),
        migrations.CreateModel(
            name='TbUserOrg',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('create_date', models.DateTimeField()),
                ('org', models.ForeignKey(to='tb_forms.TbOrg')),
                ('user', models.ForeignKey(to='tb_forms.TbUser')),
            ],
            options={
                'db_table': 'tb_user_org',
            },
        ),
        migrations.CreateModel(
            name='Workflow',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('description', models.CharField(blank=True, null=True, max_length=150)),
                ('effective_time', models.IntegerField(blank=True, null=True)),
                ('end', models.IntegerField(blank=True, null=True)),
                ('start', models.IntegerField(blank=True, null=True)),
                ('flowchart', models.TextField(blank=True, null=True)),
                ('founder', models.CharField(blank=True, null=True, max_length=30)),
                ('rectime', models.DateTimeField(blank=True, null=True)),
                ('update_time', models.DateTimeField(blank=True, null=True)),
                ('workflow_type', models.CharField(max_length=50)),
            ],
            options={
                'db_table': 'tb_workflow',
            },
        ),
        migrations.CreateModel(
            name='WorkflowApprovalRecord',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('status', models.CharField(blank=True, null=True, max_length=20)),
                ('approver', models.CharField(blank=True, null=True, max_length=20)),
                ('next', models.CharField(blank=True, null=True, max_length=20)),
                ('start_time', models.DateTimeField(blank=True, null=True)),
                ('end_time', models.DateTimeField(blank=True, null=True)),
                ('order_number', models.IntegerField(blank=True, null=True)),
                ('action', models.CharField(blank=True, null=True, max_length=20)),
                ('next_approver', models.CharField(max_length=100)),
                ('username', models.CharField(blank=True, null=True, max_length=45)),
            ],
            options={
                'db_table': 'tb_workflow_approval_record',
            },
        ),
        migrations.CreateModel(
            name='Workflowrecord',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('pdf', models.CharField(max_length=200)),
                ('pdf55', models.CharField(max_length=200)),
                ('no', models.CharField(blank=True, db_column='NO', null=True, max_length=50)),
                ('desc', models.CharField(blank=True, null=True, max_length=200)),
                ('status', models.CharField(blank=True, null=True, max_length=45)),
                ('create_time', models.DateTimeField(blank=True, null=True)),
                ('end_time', models.CharField(blank=True, null=True, max_length=45)),
                ('org_id', models.IntegerField()),
                ('workflow', models.ForeignKey(to='tb_forms.Workflow')),
            ],
            options={
                'db_table': 'tb_workflowrecord',
            },
        ),
        migrations.AddField(
            model_name='workflowapprovalrecord',
            name='workflow_record',
            field=models.ForeignKey(to='tb_forms.Workflowrecord'),
        ),
        migrations.AddField(
            model_name='tbforms',
            name='table_type',
            field=models.ForeignKey(to='tb_forms.TbFormtype', blank=True, null=True),
        ),
        migrations.AddField(
            model_name='tbforms',
            name='workflow',
            field=models.ForeignKey(to='tb_forms.Workflow', blank=True, null=True),
        ),
        migrations.AddField(
            model_name='tbapplyform',
            name='form',
            field=models.ForeignKey(to='tb_forms.TbForms', blank=True, null=True),
        ),
        migrations.AddField(
            model_name='tbapplyform',
            name='wrecord',
            field=models.ForeignKey(to='tb_forms.Workflowrecord'),
        ),
    ]
